<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <head>
        <meta charset="UTF-8">
        <title>Title</title>
        <script>
            var msg = '[[${msg}]]';
            if (msg != null && msg != '') {
                alert(msg);
            }
        </script>
    </head>
<body>
我是主页
<table border="1">
    <tr>
        <th>id</th>
        <th>姓名</th>
        <th>年龄</th>
        <th>性别</th>
        <th>操作</th>
    </tr>
    <tr th:each="user:${userList}" align="center">
        <td th:text="${user.id}"></td>
        <td th:text="${user.name}"></td>
        <td th:text="${user.age}"></td>
        <td th:text="${user.sex}"></td>
        <td>
            <a th:href="'/user/findById/'+${user.id}">修改</a>
            <a th:href="'/user/deleteById/'+${user.id}">删除</a>
        </td>
    </tr>

</table>
</body>
</html>